<template>
  <vxe_table :options="options" @handleTableBtn="handleTableBtn">
    <template #btn>
      <el-button type="primary" >新增共享入库</el-button>
      <el-button type="primary" >新增新品入库</el-button>
      <el-button type="primary" >新增二手入库</el-button>
      <el-button type="primary" >新增配件入库</el-button>
    </template>
  </vxe_table>
</template>

<script>
import vxe_table from "@/components/table/vxe_table.vue";
import tableMixin from "@/mixins";
export default {
  mixins:[tableMixin],
  components: {
    vxe_table,
  },
  data() {
    return {
      options: {
        id: "mytable",
        columns: [
            { field: "shop_name", title: "状态" ,width:100,search:true,valueType:'select',
              options:[
                {
                  label:'待审核',
                  value:2
                },
                {
                  label:'已作废',
                  value:3
                },
              ]
            },
            { field: "shop_name", title: "商家名称" ,width:100,},
            { field: "contact_person", title: "商家联系人" ,width:100,},
            { field: "order_number", title: "订单号" ,width:100,},
            { field: "phone_number", title: "手机号" ,width:100,},
            { field: "address", title: "地址" ,width:100},
            { field: "status", title: "状态" ,width:100},
            { field: "issuer", title: "开单人" ,width:100,},
            { field: "issue_date", title: "开单日期" ,width:100},
            { field: "customer_name", title: "客户名称" ,width:100,},
            { field: "logistics_name", title: "物流名称" ,width:100,},
            { field: "logistics_number", title: "物流单号" ,width:100},
            { field: "delivery_date", title: "交货日期" ,width:100},
            { field: "urgent", title: "加急" ,width:100},
            { field: "rent_start_time", title: "起租时间" ,width:100},
            { field: "rent_end_time", title: "租止时间" ,width:100},
            { field: "total_quantity", title: "总数量" ,width:100},
            { field: "include_tax", title: "含税" ,width:100},
            { field: "amount_excluding_tax", title: "不含税金额" ,width:100},
            { field: "amount_including_tax", title: "含税金额" ,width:100},
            { field: "tax_amount", title: "税金" ,width:100},
            { field: "invoiced", title: "是否开票" ,width:100},
            { field: "invoice_number", title: "发票号" ,width:100},
            { field: "payment_status", title: "收款状态" ,width:100},
            { field: "return_status", title: "归还状态" ,width:100},
            { field: "shipping_status", title: "发货状态" ,width:100},
            { field: "notes", title: "备注" ,width:100},
            { field: "confirm_time", title: "确认时间" ,width:100},
            { field: "confirmer", title: "确认人" ,width:100},
            { field: "shipping_time", title: "发货时间" ,width:100},
            { field: "shipper", title: "发货人" ,width:100},
            { field: "sign_time", title: "签收时间" ,width:100},
            { field: "signee", title: "签收人" ,width:100},
            { field: "return_time", title: "归还时间" ,width:100},
            { field: "returner", title: "归还人" ,width:100},
        ],
        btn:[
        {
            title:'编辑',
            handleName:'edit'
          },
          {
            title:'上架',
            handleName:'edit',
            type:'success'
          },
          {
            title:'下架',
            handleName:'edit',
            type:'success'
          },
        ]
      },
    };
  },
  methods:{
    edit(row,index){
      console.log(row,index)
    },
    handleADD(){
      this.$router.push('/addProduct/addProduct')
    }
  }
};
</script>
